<?php

//链接数据库
	$data = new mysqli('127.0.0.1','root','','friday');
    $phone = $_POST['phone']; 
//	$psw = $_POST['psw'];
	//设置中文
	mysqli_query($data,"SET NAMES utf8");
	//设置查询语句
	$sql = 'select * from zhanghao where phone = '.$phone;
	//执行
    //执行sql语句
	if($query = mysqli_query($data, $sql)){
		$rowcount = mysqli_num_rows($query);
		if($rowcount>0){
			echo '登录成功';
		}else{
			echo '登录失败';
		}
	}else{
		echo '登录失败';
	}
	mysqli_close($data);
?>